package com.pasabahceambalaj.session;

import com.pasabahceambalaj.entity.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.Arrays;

@Name("musteriList")
public class MusteriList extends EntityQuery<Musteri> {

	private static final String EJBQL = "select musteri from Musteri musteri";

	private static final String[] RESTRICTIONS = { "lower(musteri.ad) like lower(concat(#{musteriList.musteri.ad},'%'))", "lower(musteri.kod) like lower(concat(#{musteriList.musteri.kod},'%'))", };

	private Musteri musteri = new Musteri();

	public MusteriList() {
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}

	public Musteri getMusteri() {
		return musteri;
	}
}
